﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

using Gronia.WPF.Controls;
namespace Gronia.Test
{
    /// <summary>
    /// Interaction logic for ConnectContainer.xaml
    /// </summary>
    public partial class ConnectContainerTest : Window
    {
        public ConnectContainerTest()
        {
            InitializeComponent();
            Loaded += delegate
            {
                ConnectionChild child = new ConnectionChild();
                child.Position = new Point(100, 20);
                ConnectPoint connection1 = ConnectPoint.Create(child);
                child.InputPoints.Add(connection1);
                child.OutputPoints.Add(ConnectPoint.Create(child));

                ConnectionChild child2 = new ConnectionChild();
                child2.Position = new Point(400, 50);
                ConnectPoint connection2 = ConnectPoint.Create(child2);
                child2.InputPoints.Add(connection2);
                child2.InputPoints.Add(ConnectPoint.Create(child2));
                child2.OutputPoints.Add(ConnectPoint.Create(child2));

                Container.Children.Add(child);
                Container.Children.Add(child2);
                child.Connect(connection1, connection2);
            };
        }
    }
}
